<script setup lang="ts">
import { ref } from 'vue'
import { VUE_APP_BASE_API } from '@/utils/baseConfig'
const addWechatShowSate = ref(false)
const addMeShowState = ref(false)
// 定义组件参数
const props = defineProps({
  item: {
    type: Object,
    required: true,
  },
})
/* function addMe() {
  addMeShowState.value = true
} */
function addWechat() {
  addWechatShowSate.value = true
}
function tel() {
  window.location.href = 'tel:' + props.item.user.mobilePhone
}
</script>
<template>
  <div class="shareContent">
    <van-row>
      <van-col span="6">
        <div class="cardContentImage">
          <img :src="item.member.avatarUrl" alt="" />
        </div>
      </van-col>
      <van-col span="8">
        <div class="cardContentRight">
          <div class="contentTile">{{ item.user.realName }}</div>
          <div class="contentValue">
            <span><van-text-ellipsis :content="item.user.enterpriseName" /></span>
          </div>
          <div class="contentValue">
            <span>{{ item.user.positionNames }}</span>
          </div>
        </div>
      </van-col>
      <van-col span="10" class="shareOp">
        <van-image
          class="shareOpImage"
          width="40"
          height="40"
          :src="VUE_APP_BASE_API + '/images/vue/changeMobile.png'"
          :onclick="tel"
        />
        <van-image
          class="shareOpImage"
          width="40"
          height="40"
          :src="VUE_APP_BASE_API + '/images/vue/rywechatCode.png'"
          alt=""
          :onclick="addWechat"
        />
      </van-col>
    </van-row>
  </div>
  <van-dialog v-model:show="addMeShowState" title="" show-cancel-button>
    <img style="width: 100%" :src="item.bussiCard.wechatQrCode || ''" />
    <div class="shareOpTip">提示：长按识别二维码添加好友</div>
  </van-dialog>
  <van-dialog v-model:show="addWechatShowSate" title="" show-cancel-button>
    <img style="width: 100%" :src="item.member.wechatQrCode" />
    <div class="shareOpTip">提示：长按识别二维码关注成都瑞一公众号，获取更多资讯与服务</div>
  </van-dialog>
</template>
<style lang="css" scoped></style>
